function add(){
    // var data={name:"麻六",age:33,salary:7500};
    // $.post("/emp/add.do",data,callback,"JSON");
    // function callback(data){
    //     console.log(data);
    // }
    var inputs=${"#div1 input"}
    var data = {name:inputs.eq(0).val(),age:inputs.eq(1).val(),salary:inputs.eq(2).val()}
    $.post("/emp/add.do",data,callback,"JSON)
    function callback(data){
        console.log(data)
        let div=${"#msgDIV"}
        if (data.flag){
            div.css("color","green");
        }else {
            div.css("color","red")
        }
        div.html(data.msg);
        div.show();
        window.setTimeout(function (){
            div.hide();
        },3000)
    }
}